package com.lxp.kotlintest

import android.content.Intent
import android.support.v7.app.AppCompatActivity
import android.os.Bundle
import android.support.design.widget.Snackbar
import android.support.v7.widget.LinearLayoutManager
import android.view.View
import android.widget.Toast
import com.lxp.kotlintest.adapter.FunctionAdapter
import com.lxp.kotlintest.base.BaseActivity
import com.lxp.kotlintest.view.news.NewsListActivity
import kotlinx.android.synthetic.main.activity_main.*

class MainActivity : BaseActivity() {

    override fun widgetClick(v: View?) {
        when (v?.id) {
            R.id.btn_news -> {
                startActivity(Intent(this, NewsListActivity::class.java))
            }
            else -> {

            }
        }
    }

    override fun bindLayout(): Int {
        return R.layout.activity_main
    }

    override fun initParms(parms: Bundle?) {

    }

    override fun initViews() {
        btn_news.setOnClickListener(this)
    }

    override fun doBusiness() {

    }

}
